package datastructure.segmenttree;

/**
 * @author XY
 * @version 1.0
 * @date 2021/12/15 14:55
 * @Description
 */
public class Main {

    public static void main(String[] args) {
        Integer[] nums = {-1,2,-5,4,2,-3};
        SegmentTree<Integer> tree= new SegmentTree<>(nums,(a,b) -> a+b);
//        System.out.println(tree.getSize());
        Integer query = tree.query(2, 4);
        System.out.println(query);
    }
}
